﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using AioApp.Bll;

namespace AioApp.Views
{
    public partial class LoginForm : Form
    {
        public LoginForm()
        {
            InitializeComponent();
        }

        private bool Validated = false;

        public bool IsValidated()
        {
            return Validated;
        }

        private void LoginButton_Click(object sender, EventArgs e)
        {

            bool ret = Util.Instance.Login(comboBox1.Text, textBox1.Text);
            if (ret == true)
            {
                Validated = true;
                Close();
            }
            else
            {
                Validated = false;
                MessageBox.Show("Invalid password or user");
            }
        }
    }
}
